<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="${BASE_PATH}/static/css/common.css"/>
<link rel="stylesheet" type="text/css" href="${BASE_PATH}/static/css/dl.css"/>
<link rel="stylesheet" type="text/css" href="${BASE_PATH}/static/css/jgxxgl1.css"/>
<script type="text/javascript" src="${BASE_PATH}/static/js/jquery.js"></script>
<script type="text/javascript" src="${BASE_PATH}/static/js/jquery.pagination.js"></script>
<script src="${BASE_PATH}/static/js/jquery.lightbox_me.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="${BASE_PATH}/static/js/login.js"></script>		
<script type="text/javascript" src="${BASE_PATH}/static/js/jquery.form.js"></script>
<script type="text/javascript">
	function AjaxSubmit()
    {  
    	var cValue =$("#form1").formSerialize();
    	alert(cValue);
        $.ajax({
            type: "POST",
            url: "${BASE_PATH}/res_online/save",
			dataType : "json",
			cache : false,
			data : cValue + "&no-cache=" + Math.round(Math.random() * 10000),
			success : onAfterSubmit
		});
	}
	
	function onAfterSubmit(ret) {
		//保存成功
		if (ret.Code == 1) {
			alert("数据保存成功！");
			window.location.reload();
			return;
		}

		if (ret.Code == 2) {
			alert("用户登录失败！");
			return;
		}

		//验证失败
		if (ret.Code == 3) {
			var vCtrlID = ret.ctrlID;
			var vMessage = ret.message;
			$("#" + vCtrlID).focus();
			alert(vMessage);
			return;
		}
	}	
</script>
<title>在线资源上架</title>
</head>
<body>
<!--head start-->
<#include "../common/myspacetop.ftl"/> 
<!--head end-->
<div class="fnav system_fnav">
   <ul>
      <li><a href="###" target="_top">首页</a></li>
      <li><span>></span></li>
      <li><a href="###" target="_top">我的预约</a></li>
      <li><span>></span></li>
      <li><a href="###" target="_top">所有预约</a></li> 
   </ul>   
</div>
<div class="my-content">
   <#include "../common/left.ftl"/> 
   <div class="coright"> 
      <h2 class="my-bt"><span>在线资源</span></h2>
      <div class="content-con">
        <form id="form1" method="post">
         <div class="content-con1">
            <span class="bttext">资源名称:</span><input type="text" id="res_title" name="res_title" />
         </div>
         <div class="content-con1" style="display:none">
            <span class="bttext">资源所属单位:</span><input type="text" id="res_langua3ge" name="res_3language" />
         </div>
         <div class="content-con1">
            <span class="bttext">语言:</span><input type="text" id="res_language" name="res_language"  />
         </div>
         <div class="content-con1">
            <span class="bttext">学科分类:</span>
            <select id="res_prozone" name="res_prozone">	
				<#list typeid_41_list as rowkey>  
           		<li><option value="${rowkey.code_name_id}">${rowkey.code_value}</option>
           		</#list>	
        	</select>
         </div>
         <div class="content-con2">
            <span class="bttext">资源类型:</span>
			<select id="res_onlinetype" name="res_onlinetype">	
				<#list typeid_20_list as rowkey>  
           		<li><option value="${rowkey.code_name_id}">${rowkey.code_value}</option>
           		</#list>	
        	</select>
         </div>
         <div class="content-con1">
            <span class="bttext">呈现方式:</span>
             <select id="res_viewtype" name="res_viewtype">	
				<#list typeid_19_list as rowkey>  
           		<li><option value="${rowkey.code_name_id}">${rowkey.code_value}</option>
           		</#list>	
        	</select>
         </div>
         <div class="content-con2">
            <span class="bttext">资源描述:</span><textarea id="res_desc" name="res_desc"></textarea>
         </div>
         <div class="content-con2">
            <span class="bttext">资源链接地址:</span><textarea id="res_request_url" name="res_request_url"></textarea>
         </div>
           <div class="content-con2">
            <span class="bttext">使用要求:</span><textarea id="res_requirement" name="res_requirement"></textarea>
         </div>
          <div class="content-con1">
            <span class="bttext">版权归属:</span><input type="text" id="res_copyright" name="res_copyright" />
         </div>
         <div class="content-con1">
            <span class="bttext">规格:</span><input type="text" id="res_size" name="res_size" />
         </div>
          <div class="content-con1">
            <span class="bttext">获取方式:</span><input type="text" id="res_request_type" name="res_request_type" />
         </div>
         <div class="content-con1">
         <div class="content-con1">
            <span class="bttext">联系人:</span><input type="text" id="res_contact" name="res_contact" />
         </div>
         <div class="content-con1">
            <span class="bttext">电话:</span><input type="text" id="res_contact_phone" name="res_contact_phone" />
         </div>
         </form>
         <div class="clear"></div>
         	<div class="bcbutton1">
         		<input type="button" value="提交" onclick="AjaxSubmit();"  />
         	</div>
         </div>
      </div>
   </div>
</div>
<div class="clear"></div>
</body>
</html>
